import java.util.Arrays;

public class Select {
    public static void main(String[] args) {
        int[] arr = {10, 44, 23, 242, 111, 2, 0};
        new Select().select(arr);
    }

    public void select(int[] a) {
        for (int i = 0; i < a.length - 1; i++) {
            for (int j = i + 1; j < a.length; j++) {
                if (a[i] > a[j]) {
                    int t = a[j];
                    a[j] = a[i];
                    a[i] = t;
                }
            }
        }
        System.out.println(Arrays.toString(a));
    }
}